#if (FEATURE_MODE == 0)
#include "ctc_tmx_dtel.h"
#include "ctc_error.h"
#include "sys_usw_common.h"
#include "sys_usw_dtel.h"

int32
ctc_tmx_dtel_set_property(uint8 lchip, ctc_dtel_property_t type, void* value)
{
    uint8 lchip_start = 0;
    uint8 lchip_end = 0;

    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_FOREACH_LCHIP(lchip_start, lchip_end, 1)
    {
        CTC_ERROR_RETURN(sys_usw_dtel_set_property(lchip, type, value));
    }
    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_get_property(uint8 lchip, ctc_dtel_property_t type, void* value)
{
    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_ERROR_RETURN(sys_usw_dtel_get_property(lchip, type, value));

    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_set_int_cfg(uint8 lchip, ctc_dtel_int_cfg_t* p_cfg)
{
    uint8 lchip_start = 0;
    uint8 lchip_end = 0;

    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_FOREACH_LCHIP(lchip_start, lchip_end, 1)
    {
        CTC_ERROR_RETURN(sys_usw_dtel_set_int_cfg(lchip, p_cfg));
    }
    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_get_int_cfg(uint8 lchip, ctc_dtel_int_cfg_t* p_cfg)
{
    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_ERROR_RETURN(sys_usw_dtel_get_int_cfg(lchip, p_cfg));

    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_set_ifa_cfg(uint8 lchip, ctc_dtel_ifa_cfg_t* p_cfg)
{
    uint8 lchip_start = 0;
    uint8 lchip_end = 0;

    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_FOREACH_LCHIP(lchip_start, lchip_end, 1)
    {
        CTC_ERROR_RETURN(sys_usw_dtel_set_ifa_cfg(lchip, p_cfg));
    }
    return CTC_E_NONE;
}
int32
ctc_tmx_dtel_get_ifa_cfg(uint8 lchip, ctc_dtel_ifa_cfg_t* p_cfg)
{
    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_ERROR_RETURN(sys_usw_dtel_get_ifa_cfg(lchip, p_cfg));

    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_init(uint8 lchip, void* p_global_cfg)
{
    uint8 lchip_start = 0;
    uint8 lchip_end = 0;

    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_FOREACH_LCHIP(lchip_start, lchip_end, 1)
    {
        CTC_ERROR_RETURN(sys_usw_dtel_init(lchip, p_global_cfg));
    }
    return CTC_E_NONE;
}

int32
ctc_tmx_dtel_deinit(uint8 lchip)
{
    uint8 lchip_start = 0;
    uint8 lchip_end = 0;

    FEATURE_SUPPORT_CHECK(CTC_FEATURE_DTEL);
    LCHIP_CHECK(lchip);

    CTC_FOREACH_LCHIP(lchip_start, lchip_end, 1)
    {
        CTC_ERROR_RETURN(sys_usw_dtel_deinit(lchip));
    }
    return CTC_E_NONE;
}
#endif

